
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module data_model.model</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="data_model.html"><font color="#ffffff">data_model</font></a>.model</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/lc6/pygenome/src/data_model/model.py">/home/lc6/pygenome/src/data_model/model.py</a></font></td></tr></table>
    <p><tt>Observable&nbsp;<a href="#Model">Model</a></tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="logging.html">logging</a><br>
</td><td width="25%" valign=top><a href="operator.html">operator</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="data_model.model.html#Model">Model</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Model">class <strong>Model</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>A&nbsp;MVC&nbsp;model&nbsp;class.&nbsp;This&nbsp;class&nbsp;stored&nbsp;all&nbsp;the&nbsp;cog&nbsp;data&nbsp;sets<br>
for&nbsp;all&nbsp;users.Each&nbsp;data&nbsp;set&nbsp;can&nbsp;be&nbsp;addressed&nbsp;by&nbsp;its&nbsp;file&nbsp;name<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Model-__init__"><strong>__init__</strong></a>(self)</dt></dl>

<dl><dt><a name="Model-add_data"><strong>add_data</strong></a>(self, data)</dt><dd><tt>Add&nbsp;data&nbsp;to&nbsp;data&nbsp;set.&nbsp;the&nbsp;data&nbsp;should&nbsp;be&nbsp;a&nbsp;CogModel&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;to&nbsp;represent<br>
a&nbsp;file&nbsp;in&nbsp;data&nbsp;directory<br>
&nbsp;<br>
Arguments:<br>
-&nbsp;`data`:&nbsp;a&nbsp;CogModel</tt></dd></dl>

<dl><dt><a name="Model-get_child_model"><strong>get_child_model</strong></a>(self, file_name, user_id)</dt><dd><tt>Return&nbsp;a&nbsp;cog_model&nbsp;<a href="__builtin__.html#object">object</a><br>
&nbsp;<br>
Arguments:<br>
-&nbsp;`file_name`:&nbsp;user&nbsp;file&nbsp;name<br>
-&nbsp;`user_id`:&nbsp;user&nbsp;id</tt></dd></dl>

<dl><dt><a name="Model-get_child_model_names"><strong>get_child_model_names</strong></a>(self, user_id)</dt><dd><tt>Return&nbsp;a&nbsp;list&nbsp;of&nbsp;file&nbsp;name&nbsp;string</tt></dd></dl>

<dl><dt><a name="Model-get_cog"><strong>get_cog</strong></a>(self, cog, file_name, user_id)</dt><dd><tt>Get&nbsp;a&nbsp;single&nbsp;Cog&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;from&nbsp;given&nbsp;file_name&nbsp;and&nbsp;user_id<br>
&nbsp;<br>
Arguments:<br>
-&nbsp;`cog`:&nbsp;cog&nbsp;family&nbsp;name<br>
-&nbsp;`file_name`:&nbsp;a&nbsp;file&nbsp;base&nbsp;name<br>
-&nbsp;`user_id`:&nbsp;user&nbsp;id</tt></dd></dl>

<dl><dt><a name="Model-remove_data"><strong>remove_data</strong></a>(self, file_name, user_id)</dt><dd><tt>Remove&nbsp;data&nbsp;file&nbsp;matchs&nbsp;file_name&nbsp;and&nbsp;user_id</tt></dd></dl>

<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__dict__</strong> = &lt;dictproxy object&gt;<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dl>

<dl><dt><strong>__weakref__</strong> = &lt;attribute '__weakref__' of 'Model' objects&gt;<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;(if&nbsp;defined)</tt></dl>

</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>__author__</strong> = 'Lei Chen &lt;hide1713@gmail.com&gt;'</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
    
<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Lei&nbsp;Chen&nbsp;&lt;hide1713@gmail.com&gt;</td></tr></table>
</body></html>